home *** CD-ROM | disk | FTP | other *** search
/ Interactive Web Graphics with Shout 3D / Interactive Web Graphics With Shout 3D.iso / mac / Shout3Ddemo / S3D_2E1.exe / Shout3d_runtime / codebase / models / DoubleEventToBooleanTest.s3d < prev    next >
Text File  |  2000-05-30  |  3KB  |  114 lines

  1. #VRML V2.0 utf8
  2. WorldInfo {
  3.  title "Spazz3D"
  4.  info [
  5.   "This VRML World was created with Spazz3D, a VRML 97 authoring tool"
  6.   "www.spazz3d.com"
  7.  ]
  8. }
  9.     DEF dad_Box1 Transform {
  10.      translation -1.87176 0.86 0.0
  11.      rotation 0.865 0.503 0.0 0.684
  12.      children [
  13.       DEF BOX1_TOUCHSENSOR TouchSensor{}
  14.       DEF Box1 Shape {
  15.        appearance Appearance {
  16.         material DEF Red_mat Material {
  17.          diffuseColor 1.0 0.0 0.0
  18.         }
  19.        }
  20.        geometry IndexedFaceSet {
  21.         solid TRUE
  22.         creaseAngle 1.047
  23.         coord Coordinate {
  24.          point [
  25.           -0.50000 0.50000 -0.50000
  26.           -0.50000 0.50000 0.50000
  27.           0.50000 0.50000 0.50000
  28.           0.50000 0.50000 -0.50000
  29.           -0.50000 -0.50000 -0.50000
  30.           -0.50000 -0.50000 0.50000
  31.           0.50000 -0.50000 0.50000
  32.           0.50000 -0.50000 -0.50000
  33.          ]
  34.         }
  35.         coordIndex [
  36.           0 1 2 -1 
  37.           0 2 3 -1 
  38.           1 5 6 -1 
  39.           1 6 2 -1 
  40.           2 6 7 -1 
  41.           2 7 3 -1 
  42.           3 7 4 -1 
  43.           3 4 0 -1 
  44.           0 4 5 -1 
  45.           0 5 1 -1 
  46.           6 5 4 -1 
  47.           6 4 7 -1 
  48.         ]
  49.        }
  50.       }
  51.      ]
  52.     }
  53.     DEF dad_Box2 Transform {
  54.      translation 0 0.86 0.0
  55.      rotation 0.865 0.503 0.0 0.684
  56.      children [
  57.       DEF BOX2_TOUCHSENSOR TouchSensor{}
  58.       DEF Box2 Shape {
  59.        appearance Appearance {
  60.         material DEF Blue_mat Material {
  61.          diffuseColor 0.0 1.0 0.0
  62.         }
  63.        }
  64.        geometry IndexedFaceSet {
  65.         solid TRUE
  66.         creaseAngle 1.047
  67.         coord Coordinate {
  68.          point [
  69.           -0.50000 0.50000 -0.50000
  70.           -0.50000 0.50000 0.50000
  71.           0.50000 0.50000 0.50000
  72.           0.50000 0.50000 -0.50000
  73.           -0.50000 -0.50000 -0.50000
  74.           -0.50000 -0.50000 0.50000
  75.           0.50000 -0.50000 0.50000
  76.           0.50000 -0.50000 -0.50000
  77.          ]
  78.         }
  79.         coordIndex [
  80.           0 1 2 -1 
  81.           0 2 3 -1 
  82.           1 5 6 -1 
  83.           1 6 2 -1 
  84.           2 6 7 -1 
  85.           2 7 3 -1 
  86.           3 7 4 -1 
  87.           3 4 0 -1 
  88.           0 4 5 -1 
  89.           0 5 1 -1 
  90.           6 5 4 -1 
  91.           6 4 7 -1 
  92.         ]
  93.        }
  94.       }
  95.      ]
  96.     }
  97.     DEF Light1 DirectionalLight {
  98.      ambientIntensity 0.000
  99.      intensity 1.000
  100.      direction 0.99489 0.08952 0.04676
  101.      color 1.0 1.0 1.0
  102.      on FALSE
  103.     }
  104.  
  105. # This will turn the light on
  106. DEF DOUBLE_TO_BOOLEAN_1 DoubleEventToBoolean{} 
  107. ROUTE BOX1_TOUCHSENSOR.touchTime TO DOUBLE_TO_BOOLEAN_1.doubleField
  108. ROUTE DOUBLE_TO_BOOLEAN_1.booleanTrueField TO Light1.on
  109.  
  110. # This will turn the light off
  111. DEF DOUBLE_TO_BOOLEAN_2 DoubleEventToBoolean{}
  112. ROUTE BOX2_TOUCHSENSOR.touchTime TO DOUBLE_TO_BOOLEAN_2.doubleField
  113. ROUTE DOUBLE_TO_BOOLEAN_2.booleanFalseField TO Light1.on
  114.